#pragma once

#include <vector>
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <memory>
#include "vortex/graphics/renderable.h"


namespace vortex
{
    class SceneNode
    {
    public:
        glm::mat4 transform;  // relative transformation
        bool hasGeometry = false;
        std::shared_ptr<Renderable> mesh;

        // hierarchical information
        SceneNode* parent = nullptr;
        std::vector<SceneNode*> children;

        SceneNode();
        void addChild(SceneNode* child);
        glm::mat4 getAbsoluteTransform();
        void updateTransform();
    };
}
